// 调用common.js中的函数，需要在页面导入common.js
console.log(getNowTime());

let divNow = document.getElementById('divNow');

divNow.innerHTML = getNowTime();

setInterval(() => {
  divNow.innerHTML = getNowTime();
}, 1000);

// 对话框弹出
// 方法1
let btnDialog = document.getElementById('btnDialog');
let mymodal = document.getElementById('mymodal');

// 创建对话框对象
let dialog = new bootstrap.Modal(mymodal);

btnDialog.addEventListener('click', () => {
  dialog.show();
});

// 方法2
// let btnDialog = document.getElementById('btnDialog');

// btnDialog.addEventListener('click', () => {
//   mymodal.show();
// });

// const mymodal = new bootstrap.Modal('#mymodal', {
//   keyboard: false
// })
